package b1.conifg.story
{
	public class TowerGridConfig
	{
		//格子类型
		public var type:int;
		//地表类型
		public var texture:int;
		//坐标
		public var posX:int;
		public var posY:int;
		//动物信息
		public var animalId:int;
		//战斗信息
		public var fightConfig:FightConfig;
		//用于计算路径, 距离
		public var dist:int;
		//用于计算路径, 路径父节点
		public var parent:TowerGridConfig;
		//出口的目的地地址索引
		public var exitLiveId:int;
		//下一层索引
		public var nextLayerId:int;
		//锁索引
		public var keyId:int;
		//钥匙索引
		public var lockId:int;
		
		public function TowerGridConfig(gridXML:XML = null)
		{
			if (gridXML != null)
			{
				type = parseInt(gridXML.type);
				texture = parseInt(gridXML.texture);
				posX = parseInt(gridXML.posX);
				posY = parseInt(gridXML.posY);
				animalId = parseInt(gridXML.animalId);
				exitLiveId = parseInt(gridXML.exitLiveId);
				nextLayerId = parseInt(gridXML.nextLayerId);
				keyId = parseInt(gridXML.keyId);
				lockId = parseInt(gridXML.lockId);
				fightConfig = new FightConfig(gridXML.fightInfo[0]);
			}
		}

	}
}